<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="/tp/Public/css/bootstrap.min.css"/>
    <link rel="stylesheet" type="text/css" href="/tp/Public/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/tp/Public/css/style.css"/>
</head>

<body>
<div id="container">
    <!---->

    <nav id="header" class="navbar navbar-default" role="navigation">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#"><b>BBS</b></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li id="tab_1">
                    <a href="<?php echo U('Article/index');?>"><b>首页</b></a>
                </li>
                <li id="tab_2">
                    <a href="<?php echo U('Sort/index');?>"><b>分类</b></a>
                </li>
                <li id="tab_3">
                    <a href="<?php echo U('User/index');?>"><b>会员</b></a>
                </li>
                <?php if($_SESSION['uid']!= null): ?><li id="tab_4">
                        <a href="<?php echo U('Article/add');?>"><b>发表</b></a>
                    </li><?php endif; ?>

            </ul>
            <form class="navbar-form navbar-left" role="search" action="<?php echo U('Index/search');?>" method="get">
                <div class="form-group">
                    <input type="text" class="form-control" name="keyword" placeholder="Search">
                </div>
            </form>
            <?php if($_SESSION['uid']== null): ?><ul class="nav navbar-nav navbar-right">
                    <li  id="tab_7">
                        <a href="<?php echo U('User/login');?>">
                            <b>登录</b>
                        </a>
                    </li>
                    <li id="tab_8">
                        <a href="<?php echo U('User/rigister');?>"><b>注册</b></a>
                    </li>
                </ul><?php endif; ?>
            <?php if($_SESSION['uid']!= null): ?><ul class="nav navbar-nav navbar-right">
                    <li id="tab_5">

                        <a href="<?php echo U('notice/index');?>">
                            <i class="icon-envelope"></i>
                            <span id="">1</span>
                        </a>
                    </li>
                    <li class="dropdown" id="tab_6">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <b><?php echo (session('uid')); ?></b>
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu" role="menu">
                            <li>
                                <a href="<?php echo U('User/info');?>"><b>个人网页</b></a>
                            </li>
                            <li>
                                <a href="<?php echo U('Home/User/set');?>"><b>设置</b></a>
                            </li>
                            <?php if($_SESSION['uid']== root): ?><li>
                                    <a href="<?php echo U('Home/Admin/index');?>"><b>后台管理</b></a>
                                </li><?php endif; ?>
                            <li class="divider"></li>
                            <li>
                                <a href="<?php echo U('User/logout');?>"><b>退出</b></a>
                            </li>
                        </ul>
                    </li>
                </ul><?php endif; ?>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</nav>

    <!---->

    <div id="main" class="container">
        <div class="row">
            <div class="col-md-8">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><b>设置</b></h3>
                    </div>
                    <div class="panel-body">
                        <div class="form-group tabbable" id="">
                            <ul class=" nav nav-tabs">
                                <li class="active">
                                    <a href="#panel-01" data-toggle="tab">信息编辑</a>
                                </li>
                                <li>
                                    <a href="#panel-02" data-toggle="tab">头像更改</a>
                                </li>
                                <li>
                                    <a href="#panel-03" data-toggle="tab">密码安全</a>
                                </li>
                            </ul>
                            <br/>
                            <div class="tab-content">
                                <div class="tab-pane active" id="panel-01">
                                    <form class="form-horizontal" role="form" action="<?php echo U('User/set');?>" method="post">
                                        <div class="form-group">
                                            <label for="" class="col-sm-2 control-label">邮箱</label>
                                            <div class="col-sm-10">
                                                <input type="email" class="form-control" id="" name="email" value="<?php echo ($user['email']); ?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="" class="col-sm-2 control-label">签名</label>
                                            <div class="col-sm-10">
                                                <input type="text" class="form-control" id="" name="signature" value="<?php echo ($user['signature']); ?>">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="" class="col-sm-2 control-label">简介</label>
                                            <div class="col-sm-10">
                                                <textarea class="form-control" name="introduction" id="" cols="" rows="5" ><?php echo ($user['introduction']); ?></textarea>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <input type="hidden" name="type" value="base_info"/>
                                                <button type="submit" class="btn btn-default">保存信息</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                                <div class="tab-pane" id="panel-02">
                                    <form class="form-horizontal" role="form" action="<?php echo U('User/set');?>" method="post" enctype="multipart/form-data">
                                        <div class="form-group">
                                            <label for="" class="col-sm-2 control-label">当前头像</label>
                                            <div class="col-sm-10">
                                                <a href="#">
                                                    <img id="" src="/tp/Public/images/<?php echo ($user['avatar_name']); ?>" style="width: 100px;height: 100px;" />
                                                </a>
                                                <div class="panel-body">仅支持512k以内的jpg、jpeg、png、gif图片作为头像;图片越方越好</div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="" class="col-sm-2 control-label">选择图片</label>
                                            <div class="col-sm-10">
                                                <input class="form-control" type="file" name="file" />
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <input type="hidden" name="type" value="avatar"/>
                                                <button type="submit" class="btn btn-default">更新头像</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                                <div class="tab-pane" id="panel-03">

                                    <form class="form-horizontal" role="form" action="<?php echo U('User/set');?>" method="post">
                                        <div class="form-group">
                                            <label for="" class="col-sm-2 control-label">当前密码</label>
                                            <div class="col-sm-10">
                                                <input type="password"  name="old_password" class="form-control" id="" placeholder="旧密码">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="" class="col-sm-2 control-label">新密码</label>
                                            <div class="col-sm-10">
                                                <input type="password" class="form-control" id="" name="new_passowrd"  placeholder="新密码">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label for="" class="col-sm-2 control-label">确认密码</label>
                                            <div class="col-sm-10">
                                                <input type="password" class="form-control" id="" name="again_new_passowrd"  p placeholder="确认密码">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <input type="hidden" name="type" value="password"/>
                                                <button type="submit" class="btn btn-default">更新密码</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>

            </div>

            <div class="col-md-4 hidden-xs">



            </div>
        </div>

    </div>

    <!---->
</div>
<!---->

<footer id="footer">
    <div class="container">
        <p>Powered by BBS 2016-2017 Allright rights reserved</p>
    </div>
</footer>
<!---->
<script src="/tp/Public/js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
<script src="/tp/Public/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
</body>

</html>